home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / devel / tcl / itcl1_31.z / itcl1_31 / tcldev / itcl-1.3 / tests / Geek.tcl < prev    next >
Encoding:
Text File  |  1993-09-23  |  960 b   |  41 lines

  1. #
  2. # Test class for [incr Tcl] test suite
  3. # ----------------------------------------------------------------------
  4. #   AUTHOR:  Michael J. McLennan       Phone: (215)770-2842
  5. #            AT&T Bell Laboratories   E-mail: aluxpo!mmc@att.com
  6. #
  7. #     SCCS:  @(#)Geek.tcl    1.1 (7/15/93)
  8. # ----------------------------------------------------------------------
  9. #            Copyright (c) 1993  AT&T  All Rights Reserved
  10. # ======================================================================
  11.  
  12. itcl_class Geek {
  13.  
  14.     #
  15.     #  Constructor/destructor add their name to a global var for
  16.     #  tracking implicit constructors/destructors
  17.     #
  18.     constructor {config} {
  19.         global WATCH
  20.         lappend WATCH [info class]
  21.     }
  22.     destructor {
  23.         global WATCH
  24.         lappend WATCH [info class]
  25.     }
  26.  
  27.     method do {cmds} {
  28.         return "Geek says '[eval $cmds]'"
  29.     }
  30.  
  31.     method config {config} {
  32.         return $config
  33.     }
  34.  
  35.     #
  36.     #  Define variables that will be shadowed by another class.
  37.     #
  38.     public blat
  39.     protected _blat
  40. }
  41.